package com.novax.ex.activity.provider.service;

import com.novax.ex.activity.infrastructure.entity.IeoContent;
import com.novax.ex.activity.infrastructure.mapper.IeoContentMapper;
import com.novax.ex.common.base.BaseMapper;
import com.novax.ex.common.base.BaseService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * @Description ieo文本信息
 * @Author 黄涛
 * @Date 2022/12/02/15:44
 */
@Service
public class IeoContentService extends BaseService {

    @Resource
    private IeoContentMapper ieoContentMapper;

    @Override
    protected BaseMapper getBaseMapper() {
        return ieoContentMapper;
    }

    /**
     * 黄涛
     * 根据项目配置的主键id 查询项目配置的详情
     *
     * @param ieoId 项目配置的主键
     * @return 项目配置详情
     */
    public List<IeoContent> findByIeoId(Long ieoId) {
        return ieoContentMapper.selectByIeoId(ieoId);
    }

    /**
     * 黄涛
     * 根据项目的主键id和项目的语言查询项目介绍的详情
     *
     * @param ieoId 项目主键ID
     * @param language 项目介绍的文本信息
     * @return 项目介绍的详细信息
     */
    public IeoContent findByIeoIdAndLanguage(Long ieoId, String language) {
        return ieoContentMapper.selectByIeoIdAndLanguage(ieoId, language);
    }
}
